<?php

namespace app\api\controller\admin;

use app\common\controller\Api;
use app\api\service\admin\LeadService;

class Lead extends Api
{
    protected $noNeedLogin = ['export'];
    protected $noNeedRight = [];
    

    

    /**
     * 查看
     */
    public function index()
    {
        $data = $this->request->post();
        $res = LeadService::index($data);
        return json($res);
    }

    /**
     * 添加
     */
    public function add()
    {
        $data = $this->request->post();
        $res = LeadService::add($data);
        return json($res);
    }

    /**
     * 编辑
     */
    public function edit()
    {
        $data = $this->request->post();
        $res = LeadService::edit($data);
        return json($res);
    }

    /**
     * 删除
     */
    public function del()
    {
        $data = $this->request->post();
        $res = LeadService::del($data);
        return json($res);
    }

    /**
     * 详情
     */
    public function view()
    {
        $data = $this->request->post();
        $res = LeadService::view($data);
        return json($res);
    }


    /**
     * Collect By
     */
    public function collect_by()
    {
        $data = $this->request->post();
        $res = LeadService::collect_by($data);
        return json($res);
    }

    /**
     * Collect By
     */
    public function assign_by()
    {
        $data = $this->request->post();
        $res = LeadService::assign_by($data);
        return json($res);
    }

    /**
     * 导入
     */
    public function import()
    {
        $data = $this->request->post();
        $res = LeadService::import($data);
        return json($res);
    }

    /**
     * 导出
     */
    public function export()
    {
        $data = $this->request->post();
        $res = LeadService::export($data);
        return json($res);
    }


    /**
     * 支付记录
     */
    public function payment()
    {
        $data = $this->request->post();
        $res = LeadService::payment($data);
        return json($res);
    }

    /**
     * 新增合同
     */
    public function add_contract()
    {
        $data = $this->request->post();
        $res = LeadService::add_contract($data);
        return json($res);
    }

    /**
     * 确认支付
     */
    public function confirm_payment()
    {
        $data = $this->request->post();
        $res = LeadService::confirm_payment($data);
        return json($res);
    }

    /**
     * 合同列表
     */
    public function contract_list()
    {
        $data = $this->request->post();
        $res = LeadService::contract_list($data);
        return json($res);
    }

    /**
     * 合同详情
     */
    public function contract_view()
    {
        $data = $this->request->post();
        $res = LeadService::contract_view($data);
        return json($res);
    }

    /**
     * 批准合同
     */
    public function contract_approval()
    {
        $data = $this->request->post();
        $res = LeadService::contract_approval($data);
        return json($res);
    }

    /**
     * 签署人
     */
    public function contract_signed()
    {
        $data = $this->request->post();
        $res = LeadService::contract_signed($data);
        return json($res);
    }

    /**
     * 取消合同
     */
    public function contract_cancel()
    {
        $data = $this->request->post();
        $res = LeadService::contract_cancel($data);
        return json($res);
    }

    /**
     * 收据
     */
    public function contract_receipt()
    {
        $data = $this->request->post();
        $res = LeadService::contract_receipt($data);
        return json($res);
    }
}